package com.hoperun.traffic.action.log;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts2.ServletActionContext;

import com.hoperun.traffic.entity.log.UserInfo;
import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;
import com.opensymphony.xwork2.ModelDriven;

public class LoginAction extends ActionSupport  implements ModelDriven {

	private UserInfo userInfo = new UserInfo() ;
	public String execute() throws Exception {
		// TODO Auto-generated method stub
		
		ActionContext ctx = ActionContext.getContext();        
		       
		HttpServletRequest request = (HttpServletRequest)ctx.get(ServletActionContext.HTTP_REQUEST);
		System.out.println( request.getCharacterEncoding());
		
		System.out.println("******"+userInfo.getUserid());
		
		return this.SUCCESS;
	}
	public UserInfo getModel() {
		// TODO Auto-generated method stub
		return userInfo;
	}
	
	
	

	
	



}
